const validateHttp = (rule, value, callback) => {
  const url = /(http|https):\/\/([\w.]+\/?)\S*/
  if (!url.test(value)) {
    callback(new Error("输入正确的url地址"))
  } else {
    callback()
  }
}
// 密码验证
const validatePassword = (rule, value, callback) => {
  const password = /^(?!bai[0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?!([^(0-9a-zA-Z)])+$)^.{8,16}$/
  if (!password.test(value)) {
    callback(new Error('密码至少包括大写字母小写字及数字'))
  } else {
    callback()
  }
}
export {
  validateHttp,
  validatePassword
}
